
const departmentService = require('../service/departmentService.js');
module.exports = {
    // 新增科室
    async add(req, res) {
        let result = await departmentService.add(req.query);
        res.send(result);
    },
    // 删除科室
    async del(req, res) {
        let result = await departmentService.del(req.query);
        res.send(result);
    },
    // 查询
    async select(req, res) {
        let result = await departmentService.select();
        res.send(result);
    },
    // 更新科室
    async update(req, res) {
        let result = await departmentService.update(req.query);
        res.send(result);
    },
    // 关联院区和科室，从科室的branch_id找到院区的name
    async selectdepartmentfrombranch(req, res) {
        let result = await departmentService.selectdepartmentfrombranch(req.query);
        res.send(result);
    }
    
}